CMAKE_MINIMUM_REQUIRED(VERSION 3.22.1)

SET(LIBRARY_OUTPUT_PATH ${BINANCE_LIB_PATH})

SET(build_target "binance")

INCLUDE_DIRECTORIES(
	${BINANCE_H_PATH}
)

include_directories("../../vcpkg_linux/installed/x64-linux/include")

LINK_DIRECTORIES("../../vcpkg_linux/installed/x64-linux/lib")

# generate project
rw_module_source_all()

FILE(GLOB binance_h ${BINANCE_H_PATH}/*.h)

add_library(
	${build_target}
	SHARED

	${rw_module_source_list}
)

target_link_libraries(${build_target} -lcpprest -lssl -lcrypto -lz -ldl)

set_source_files_properties(${build_target} PROPERTIES
	COMPILE_FLAGS "${EXTRA_OPTIONS}")

SET_TARGET_PROPERTIES(${build_target} PROPERTIES LINKER_LANGUAGE CXX)

SET_TARGET_PROPERTIES(${build_target} PROPERTIES CXX_STANDARD 17)

add_custom_command(TARGET ${build_target} POST_BUILD
	COMMAND ${CMAKE_COMMAND} -E copy
	$<TARGET_FILE:${build_target}>
	${BIN_PATH}/$(Configuration)/$<TARGET_FILE_NAME:${build_target}>
)

# set_target_properties(${build_target} PROPERTIES LINKER_LANGUAGE "CXX")
